<h2>[+lang.IM_title_add_multiple_items+]</h2>
[+view.message+]

<form name="form_add_mutiple_items" action="index.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="a" value="[+action_id+]" />
<input type="hidden" name="id" value="[+module_id+]" />
<input type="hidden" name="page" value="add_multiple_items" />
<table id="table3">
    <tbody>
        <tr>
            <td class="col1">Category</td>
            <td class="col2">
                <select name="data[Item][category_id][]" class="dropdown">
                [+select.categories+]
            </select>  <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a>
            </td>
        </tr>
        <tr>
            <td class="col1"></td>
            <td class="col2"><a id="add-category-link" href="javascript:">Add another category</a></td>
        </tr>
        <script type="text/javascript">
        var category_count = 0;
        $(document).ready(function() {
            $('#add-category-link').click(function(){
                category_count++
               $(this).parent().parent().before('<tr><td class="col1">Category ' + category_count + '</td><td class="col2"><select name="data[Item][category_id][]" class="dropdown">[+select.categories+]</select>  <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a></td></tr>');
            });
        });
        </script>
        <tr>
            <td class="col1">Item</td>
            <td class="col2">
                <input name="data[Item][name][]" type="text" class="textfield" value="[+lang.IM_default_item_name+]" onfocus="$(this).val() == '[+lang.IM_default_item_name+]' ? $(this).val('') : $(this).val($(this).val())" onblur="$(this).val() == '' ? $(this).val('[+lang.IM_default_item_name+]') : $(this).val($(this).val())" />
                <input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a>
            </td>
        </tr>
        <tr>
            <td class="col1"></td>
            <td class="col2"><a id="add-item-link" href="javascript:">Add another item</a></td>
        </tr>
        <script type="text/javascript">
        var item_count = 0;
        $(document).ready(function() {
            $('#add-item-link').click(function(){
                item_count++
               $(this).parent().parent().before('<tr><td class="col1">Item ' + item_count + '</td><td class="col2"><input name="data[Item][name][]" type="text" class="textfield" value="[+lang.IM_default_item_name+]" onfocus="$(this).val() == \'[+lang.IM_default_item_name+]\' ? $(this).val(\'\') : $(this).val($(this).val())" onblur="$(this).val() == \'\' ? $(this).val(\'[+lang.IM_default_item_name+]\') : $(this).val($(this).val())" /> <input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a></td></tr>');
            });
        });
        </script>

        <tr>
            <td class="col1">&nbsp;</td>
            <td class="col2">
                <input name="" class="button" type="submit" value="OK" />
                <input name="" class="button" type="button" value="Cancel" />
            </td>
        </tr>
    </tbody>
</table>
</form>